from time import time
str = raw_input()

# print str

n = len(str)

lmax = 0
index = 0
stype = 0
t1 = int(time()*1000)
for i in range(n):
    # 1
    j=0
    while i-j>=0 and i+j<n and str[i+j]==str[i-j]:
        j+=1
    if j*2-1>lmax :
        lmax=j*2-1
        index=i+1-j
        stype=1
    # 2
    j=0
    while i-j>=0 and i+1+j<n and str[i+1+j]==str[i-j]:
        j+=1
    if j*2>lmax :
        lmax=j*2
        index=i+1-j
        stype=2
t2 = int(time()*1000)

print 'max: %d'%(lmax)
print 'index: %d'%(index)
print 'strype: %d'%(stype)
print 'run time: %dms'%(t2-t1)
